package drds.binlog.client.kafka;

/**
 * kafka connectors创建工具类
 */
public class KafkaConnectors
{

    /**
     * 创建kafka客户端链接，独立运行不注册zk信息
     */
    public static KafkaConnector newKafkaConnector(String servers, String topic, Integer partition, String groupId)
    {
        return new KafkaConnector(null, servers, topic, partition, groupId);
    }

    /**
     * 创建kafka客户端链接，独立运行不注册zk信息
     */
    public static KafkaConnector newKafkaConnector(String servers, String topic, String groupId)
    {
        return new KafkaConnector(null, servers, topic, null, groupId);
    }

    /**
     * 创建kafka客户端链接
     */
    public static KafkaConnector newKafkaConnector(String zkServers, String servers, String topic, Integer partition, String groupId)
    {
        return new KafkaConnector(zkServers, servers, topic, partition, groupId);
    }

    /**
     * 创建kafka客户端链接
     */
    public static KafkaConnector newKafkaConnector(String zkServers, String servers, String topic, String groupId)
    {
        return new KafkaConnector(zkServers, servers, topic, null, groupId);
    }
}
